<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="com.kylin.module.community.orm.*,
				 com.kylin.common.*,
                 com.kylin.common.util.*,
                 com.kylin.common.paginate.DisplayPage,
				 com.kylin.module.community.orm.*" %>
<%@ include file="/common/include/taglibs.jsp"%>
<%@ include file="/common/include/pageExpires.jsp"%>
<br>

<table>
<form action="/admin/community/manageMember.do" method="post">
<input type="hidden" name="CMD" value="searchMember">
	<tr><td colspan="2" align="center"> 查询会员 </td></tr>
    <tr>
        <td>用户名 </td><td><input type="text" name="userName"></td>
    </tr>
    <tr>
        <td>会员名称   </td><td><input type="text" name="name"></td>
    </tr>
    <tr>
        <td>出生日期   </td>
        <td>
		   从<mytag:CalendarInput name="startDate" id="startDateId" imgId="startDate_img" size="10"/>&nbsp;
		   到<mytag:CalendarInput name="endDate" id="endDate" imgId="endDate_img" size="10" />
        </td>
    </tr>
    <tr>
        <td>所属国家</td><td><mytag:national name="country" dictName="<%=Constants.ALLCOUNTRY%>"/></td>
    </tr>
    <tr>
        <td>母语</td><td><mytag:national name="language" dictName="<%=Constants.ALLLANGUAGE %>"/></td>
    </tr>
	<tr><td colspan="2" align="center"> <input type="submit" value="查询"> </td></tr>
</form>	
</table>
<mytag:MyActionMsg />
<% 
    if(request.getAttribute(Constants.KEY_REQUEST_RESULT)instanceof DisplayPage){
        DisplayPage dispage = (DisplayPage)request.getAttribute(Constants.KEY_REQUEST_RESULT);
%>
		<p align="center"><b> 会员列表 </b></p>
<table class='pageTable' cellspacing='0' cellpadding='0'> 
     <tr>
        <td class='pageTitle'>顺序号</td>
        <td class='pageTitle'>用户名</td>
        <td class='pageTitle'>会员名称</td>
        <td class='pageTitle'>性别</td>
        <td class='pageTitle'>出生日期</td>
        <td class='pageTitle'>所属国家</td>
        <td class='pageTitle'>母语</td>
        <td class='pageTitle'>操作</td>
      </tr>
<%
        for(int i=0;i<dispage.getList().size();i++){
            Member obj = (Member)dispage.getList().get(i);
%>
	    <tr class='row<%=(i%2)%>'> 
	       <td class='pageTd'><%=(i+1) %> </td> 
	       <td class='pageTd'><%=obj.getUser().getUsername() %> </td> 
	       <td class='pageTd'><%=obj.getUser().getName() %> </td> 
	       <td class='pageTd'>
	       		<% 
	       		   if(Member.SEX_MAN.equals(obj.getSex())) out.println("男");
	       		   if(Member.SEX_WOMAN.equals(obj.getSex())) out.println("女");
	        	%> 
	        </td> 
	       <td class='pageTd'><%=JspHelper.getShowDate( obj.getBirthday()) %> </td> 
	       <td class='pageTd'><%=UTool.getCountryName(obj.getCountry(),Locale.getDefault()) %> </td> 
	       <td class='pageTd'><%=UTool.getLanguageName(obj.getLanguage(),Locale.getDefault()) %> </td> 
	       <td class='pageTd'><a href="/admin/community/manageMember.do?CMD=delete&userId=<%=obj.getUser().getId() %>">删除</a> </td> 
	    </tr>
<%            
        }
%>      
</table>
		<%=JspHelper.getPageBar(dispage,request.getRequestURL()+"?CMD=searchMember") %>
<%
    }
%>
